(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 8.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       157,          7]
NotebookDataLength[     43784,        908]
NotebookOptionsPosition[     42403,        860]
NotebookOutlinePosition[     42746,        875]
CellTagsIndexPosition[     42703,        872]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Valve43LS, load sensing 4-3 directional valve", "Section",
 PageWidth->WindowWidth,
 CellChangeTimes->{{3.52818909584375*^9, 3.528189095984375*^9}, {
  3.579278426568328*^9, 3.57927842906647*^9}}],

Cell[CellGroupData[{

Cell["Component description", "Subsection",
 PageWidth->WindowWidth],

Cell["\<\
This subroutine simulates the flow trough a 4-3 directional valve.\
\>", "Text",
 PageWidth->WindowWidth],

Cell[CellGroupData[{

Cell[GraphicsData["Metafile", "\<\
CF5dJ6E]HGAYHf4PEfU^I6mgLb15CDHPAVmbKF5d0@0001EL0@0006@000030000000007d0001L0000
00000000002f4`00V`h00215CDH00040G1D007l000080000000000000000000080<005P200100@00
l000000000000000000004H000081`00nPH004M4BD<1002000<004CA^:l00000hPH000402@000g43
000901`0000001@0000V1Pl07P3ooooo100D0000EfmbI0h0CFUSLVmcKfId85M_LV@500002`800000
1@0000`2S@2o01`0003k0Q001`000000_080000000000U=iLgAUK@00200000`0RP4000X0302:0@`0
RP4000X0100002d1000500000P41000070000?/2lol00000002@0@000004@00BE6U]IG<PCVEg859_
KF5^0:j7kGO@Inmg7@X:30002P040000;@4100D000090P00000300007P0700005PB=0;l000000100
000V1Pl05P3ooooo003ooooooooool40002>00000`0001h01@0002h1000000D0000:0P0000050000
2@8000001@000042oooo00L0003l0P4000000000100002d10P080000nP85004000000000100002d1
0`0400000`4800L0000B18d0S@2o0<001@0000/2?02400D0000<0VX0T0050000309Z09001@0000@1
3@0000D0000^0AP0000500000P4100001@0000T2000000D000010_ooo`0300007P040000;@4200P0
003j0PH00@00000000040000;@4400D0000;0S`0Q00700006`B30<h0G`2Z00L0000K18<0l@1O0<d0
1`0001/4P`0D0El0l0050000509O0;@01@0001<2PP2d00D0000D0Ul0``0500004`:20<<01@0001@2
G`3F00D0000C0Ul0eP050000509P0=L01@0001<2I03G00D0000D0Ul0iP0500004`9T0>H01@0001@2
O@3G00D0000C0X80e`050000509m0>H01@0001<2PP3V00D0000D0Ul0nP0500004`:200T11@0001@2
PP3j00D0000C0Ul02@450000509m0=@01@0001<2O@3J00D0000D0Wd0h`0500004`9m0>T01@0001@2
I03E00D0000C0V@0f@050000509T0>@01@0001<2I03Y00L0003l0P0000000000100002d11@0<0000
90<40;@0P@2a07X0]`1j0;@0P@0<000090<40<<0H03006L0aP1W0<<0H00>000090<500T1PP030G/0
2@5i00X1PP090H803P0002@31@090El00`5V00T1J00:0El02@5O00D0000D0W40Q`0500004`9a0:X0
300002@3102Y0740XP1d0:80KP2Y074070000?/2m?l00000002@0@000004000@E6U]IG<0001>2PYU
YHO]Mjj7kGO@InmgCPX:I@002P040000;@4600L0000Q1@80F5I^08X01`0002450P1>D4`0_P0;0000
9PH?00`0ooooo`00000000001@0001@2PP3H00D0000C0Z<0f00<000090<40=P0P`3K08h0f02>0=P0
P`070000o0800?ooo`0000@0000]0@L0300002@3103H0:@0e02H0=P0V03H0:@02`0002H63`0<0?oo
ool10000000000/0000V1Pl0303ooooo000000000005000050:30>L01@0001<2Y03W00@0000]0@D0
300002@3103W08@0jP2?0>L0S`3W08@0100002d11`0<000090<40>L0Y@3S09T0i`2I0>L0Y@0;0000
9PH?00`0ooooo`40000000002`0002H63`0<0?ooool00000000000D0000D0Sd0eP0500004`9N0=H0
100002d11@0<000090<40=H0G@3C0580eP1B0=H0G@040000;@4700`0000T0`@0eP0l0=X0B03F04P0
eP0l00/0000V1Pl0303ooooo0@000000000;00009PH?00`0ooooo`00000000001@0001@2?@3V00D0
000C0Uh0iP040000;@4500`0000T0`@0iP1M0><0DP3V0580iP1M00@0000]0@L0300002@3103V03`0
jP180>H0B03V03`02`0002H63`0<0?ooool10000000000L0000Q1@80CUA<0?801`0002450P1>@IL0
_P0700008@D204i2U`3b00@0000W0Ooo10000?011@070000o0800?ooo`0000@0000]0@D020000?X2
00000000000000@0000]0@P0100002L1ool800009PH?00H0ooooo`40100002L1ool500000P410000
100002d10003000000000140000<0000200000/0000@0000OP0005d000090000400007h0001M0000
2P00010000000000000000T0000@0000_`0008d0001B0000C0400040000@00001`00000000000000
_080000000000002D`1i07<0M01U06d0000000000000000000000000000000000000000000000000
000000000000000000000000002PmA80_iE:00X60@0<000000000=Si3P@<0000:>Um00X60@0<d?Mg
ooooodSd4P000000F?@B00004`0Il_Qg1P000>064`0001<0R2TE033d4P0009H1F?DB0=@/nGMPf?Ug
oooooace4P1DAoIgh0HC05P:8BJ<m180000Q9/1J6`090000]mC]Ma0000000000F0XQ9P008@30m180
fLO]MeP:8BIH2R4V0@0003h=5P2dINeg6_DB0000000000000000000000000000000000410@410@41
0@7]MbD0000<00000@000180000<00000@000580001<0@000P000??oool0000000000000002@0@00
000000A0019D06T0K@1U07<0801>06D0M`0P0580K`1]0640KP000000000000000000000000000000
0000000000000000000:0:3e4P2oUDX02PH100`000000000f?T>10`0000XjGd02PH100c@mgOooooo
B?@B0000001Hm180000C01Wbn7L60000h0HC00004`28:AD0<?@B0000UP5HmA80e2ciMf3HnGOooooo
7?DB05A7mWOP1Q<0F0XQ9Xcd4P00024VY?@B02D00030FQ/0F0XQ9[;4kGL<0000b?@B01800030FQ/0
F0XQ9UP:8BH10000R0dF0000000SmA80000000000000000000000000000000000@410@410@410Neg
9@0000`000020000600000`0000000008@0000P0000N00006000000000000000_`0008d0000Q0000
200001H0000<0000000001P0000<0000000001T0000<0000oooo02D0000<00001@00P2D0000<0000
2000P1l0000H0000`0000;l0002=0000S@0000X0000@0000Q00003`00009000040000900001Z0000
2@000100002@0000JP0001@0000<00003@0001H0000<000060000180000<00000@0001P0000<0000
000001T0000<0000oooo0240000800009@0000`0000500209P0001`0000300001P00004000000000
000002D0000<00000`0000X0000@0000Q00003`0000[000060000:X0001O0000c@000880000[0000
60000<d0001O0000l0000880000[000060000?00001O00004`400880000K000040000;@0001O0000
=P000100002d0000PP0001/0000@0000``0005l0000f000040000<<0002200006`000100003F0000
G`0003H0000@0000eP0005l0000K000040000=L0001P0000=P000100003G0000I00001/0000@0000
iP0005l0000f000040000>H0001T00006`000100003G0000O@0003H0000@0000e`000880000K0000
40000>H0001m0000=P000100003V0000PP0001/0000@0000nP0005l0000f0000400000T100220000
6`000100003j0000PP0003H0000@00002@4005l0000K000040000=@0001m0000=P000100003J0000
O@0001/0000@0000h`0007d0000f000040000>T0001m00006`000100003E0000I00003H0000@0000
f@0006@0000K000040000>@0001T0000=P000100003Y0000I00002L0000H00001000000000000000
000002D0000<0000100005H0000/00009`0003H0000]0000?@0000@0002d0840/@1j0;L0NP2d0840
EP0002`0000e0000800003X0000V000010000<<0H03006L0aP1W0<<0H01F0000<00006l0000f0000
M@0003d0000500002@6200<1N`090GT02P6200T1PP1F0000<00006l0000O0000M@0002L000050000
2@5O00<1IP090FP02P5O00T1G`0K0000400008L0001a0000=P000100002Z0000L@0005H0000/0000
6P0002`0000P0000<@0000@0002Y0740XP1d0:80KP2Y0740DP0004`100050000m?ooo`0000000000
0000090100000000100045@0J@1]06D0L`0000000000000000000000000000000000000000000000
00000000000000000000000000000?eo0>3mO`00000000000000000000000000300013<7000c1`C?
000400C?0004c`00IQ[]Mc<71<m<m180`5XK063d4P000000[O;hM`004`3Pc1@0000003cd4P30FQ/0
_?@B0=@/nGM`f?UgooooohSd4P3LCOIg/0HC00005004000000000;P@5P2Pm180Rkk]M`D0003<m180
<B[`M`004`000000F0XQ9P40003@41H0^10F01We4P00000000000000000000000000000000010@41
0@410@41kGLU0000300000D0001D0000F00000D0000Q00004`0002h000010000000<@Y]P34::0000
KP000080001<00000000000000000000oooooooooom@0000F01F00T000080000E00005P0000c0000
0`000440000@00000@00000034:KH0a2_P0004`000020000C00000000000000000000?oooooooooo
D00004h0D0090000200001/0000@0000f0000880000f000040000=P0002S0000EP0002`0001:0000
?P0004`00018000010000=P0P`3K08h0f02>0=P0P`0W0000600000H000000000oooo0000000U0000
300000H0001F0000;00004H0001A0000BP0005/000040000f02T0=@0V03H09P0f02T01/0000@0000
i`0008<0000f000040000>L0002T00009@0000`000040000EP0002`0001G0000?`0005T000190000
10000>L0Q03Z08l0i`2?0>L0Q00U0000300000H0001F0000;00005<0001B0000E`0005`000040000
i`2U0><0V@3W09T0i`2U01/0000@0000eP0003d0000f000040000=H0001N00009@0000`000040000
EP0002`0001500004`0004P0000M000010000=H0G@3C0580eP1B0=H0G@0U0000300000H0001F0000
;00004P000000000B`0000/000040000eP0l0=X0B03F04P0eP0l01/0000@0000iP0003d0000f0000
40000>H0001N00009@0000`000040000EP0002`0001C00004`0005H0000M000010000>H0G@3S0580
iP1B0>H0G@0U0000300000H0001F0000;00005H000000000F@0000/000040000iP0l0>X0B03V04P0
iP0l05@0001H0000H00000<0001_000040000040000000a2Vf0<@_80001<00000P0004`000000000
00000000003ooooooooooe00001>05@02@0000T0001D0000F00003<000150000@P00058000010000
000<@Y]P34:n0000U`000080001<00000000000000000000oooooooooom@0000CP1100T000090000
E00005P0001P0000A@0006h0001B00000@00000034:KH0a2lP0009L000020000C000000000000000
00000?ooooooooooD00004h0@P09000020000280000<0000ooooobP0000<0000100002L0000H0000
10000000003oool0000002D0000<0000100002H0000L00001`0000000000000000000000000U0000
300000L0000R000030000?oooolR000030000?oooolB000030000040000U000030000040000U0000
300000L0080U000030000000080`0000300000l0080U0000300000d0081;00004000000000050000
:00000`000010000:00000`000020000:00000`000030000:00000`000040000:00000`000050000
:00000`000060000:00000`0000700003P0001@000000000400001@0
\>"], "Graphics",
 ImageSize->{122, 92},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}}],

Cell[GraphicsData["Metafile", "\<\
CF5dJ6E]HGAYHf4PEfU^I6mgLb15CDHPAVmbKF5d0@0002;40@0006@0000000000@0003D1002S0000
000000000024<000;aX00215CDH00040a2800<X000080000000000000000000080<005P200100@00
l000000000000000000004H000083000o0/004M4BD<1002000<006_mKDD00000i0/000402@000o85
000902d0000001@0000V1Pl07P3ooooo100D0000EfmbI0h0CFUSLVmcKfId85M_LV@500002`800000
1@0000`2o@3E0A`0003k0Q001`000000_080000000000U=iLgAUK@00200000`0RP4000X0302:0@`0
RP4000X0100002d1000500000P41000070000?/2lol00000002@0@000004@00BE6U]IG<PCVEg859_
KF5^0:j7kGO@Inmg7@X:30002P040000;@4100D000090P00000300007P0700005PCm0=D100000100
000V1Pl05P3ooooo003oooooooooomP1003n00000`0001h01@0002h1000000D0000:0P0000050000
2@8000001@000042oooo00L0003l0P4000000000100002d10P080000nP85004000000000100002d1
0`0400000`4800L0000B1?d0o@3E0ML11@0000/2`P1@00D0000<0[h0H@45000030:n06411@0000@1
3@0000D0000^0AP0000500000P4100001@0000T2000000D000010_ooo`0300007P0;00009PH?00`0
ooooo`000000000020000?X21P010000000000@0000]0@@01@0000/2`P1@00D0000D0SH1b0050000
4`8f0@P11@0001@2=P490@D0000C0TD12@45000050950@T11@0001<2A@5:0@D0000D0TD1BP450000
4`8f0DX11@0001@2=P5:0@D0000C0SH1H`450000508C0F<11@0001<2=@5S0@D0000D0Q<1BP450000
4`8C0F<11@0001@24`5:0@D0000C0P@1BP45000050840@T11@0001<2105:0@D0000D0P@12@450000
4`8C0@T11@0001@24`7800D0000C0Q<12@450000508C0LP01@0001<2107800D0000D0P@1Q`050000
4`840LP01@0001@2106700D0000C0Q<1Q`050000508C0G<01@0001<24`6700D0000D0Q<1L`050000
4`8f0G<01@0001@2=P5c00D0000C0SH1Q`05000050950HL01@0001<2=P6700D0000D0TD1Q`050000
4`950LP01@0001@2=P7800D0000C0TD1b00;00009PH?00`0ooooo`40000000002`0002H63`0<0?oo
ool00000000000L0003l0P00oooo0000100002d11@0700006`@]0H`17@5@02d000120@D0000X0000
200000P0000100400000020000000000000000000000000000000?ooo`2Z0000E@000:X0001E0000
ZP0005D0002Z0000E@0000@0000]0@H0100002d10`0>000090<505409`6;0BL1R`4Z0E40:P5A02L1
;@0004811@0002P000080000200000400@00000080000000000000000000000000000000oooo0?l0
003M0000o`0007L0003o0000g@000?l0001g0000100002d11`040000l04600h0000T0`D0D@0P0H/1
806;0B@1D@0T0E4080440000;@4500@0003`0@L0100002d1100700006`@g0L@04`6<00L0000K13L1
AP4C0@h1;@0004811@0002P000080000200000400@00000080000000000000000000000000000000
oooo0:X0001E0000ZP0005D0002Z0000E@000:X0001E0000100002d11P040000;@4300h0000T0`D0
S@0[0L<0:`730341S@0a0Hd0:`4]0000@P450000:00000P0000800000@010000000P000000000000
0000000000000000003oool0ZP0005D0002Z0000E@000:X0001E0000ZP0005D000040000;@4700@0
003`0@H03P0002@31@0?0B/1A@4[0DD1<@4?0C413`4[0Bd000120@D0000X0000200000P000010040
0000020000000000000000000000000000000?ooo`3o0000g@000?l0001g0000o`000=d0003o0000
M`0000@0000]0@H010000?011`0>000090<508d0607301P1``0R0Hd08P6=01P1;@0004811@0002P0
00080000200000400@00000080000000000000000000000000000000oooo0?l0003M0000o`0007L0
003o0000g@000?l0001g0000100002d11`040000l04600h0000T0`D03`4H0DD160550B813`4R0@l1
60440000;@4400D0000D0S@1S@0500004`8d0L<01@0001@2=04>0@D0000C0S@1A@4;00009PH?00`0
ooooo`40000000001@0001@2<P7300D0000C0Uh1``050000508h0LP01@0001<2GP7800P0003j0PH0
0P00000000040000;@4600D0000D0^`0N@0500004`8B0GT01@0001@2k01U00D0000C0^`0i@050000
50;/05l11@0001<24`5O0@D0000D0/T0j@0500004`8C0NT01@0001@2k03]00D0000C0^`0GP450000
50960JP01@0001<2N06X00D0000D0TH1:P4500004`9h0BX1100002d110040000l04600D0000D0UT1
]@0500004`9I0N801`000?`20000000000040000;@4600@0003`0@L0300002@3103105T1^P1L0KX0
EP7105T1300002@3103905T1d01L0M00EP7905T11@0001@2<P550@D0000C0Uh1A@450000508h0DX1
1@0001<2GP5:0@D0000D0UT1=`4500004`9I0F@1300002@310130ET1?05L0C`1EP530ET1300002@3
101;0ET1DP5L0E81EP5;0ET12`0002H63`0<0?ooool00000000000D0000D0Uh13P4500004`8b0@h1
1@0001@2GP490@D0000C0SP12@450000509I0Nl01@0001<2F@4L0@`0000T0`@0405I0AL1G04G0EH1
405I0@`0000T0`@0205I0@41G0410EH1205I0@/0000V1Pl0303ooooo0@000000000;00009PH?00`0
ooooo`00000000001@0001@2GP6<00D0000C0S81S0050000509N0HL01@0001<2>06700D0000D0UT1
K@0500004`9I0IX0300002@3102>05T1U@1L0ID0EP6>05T1300002@3102605T1O`1L0Gl0EP6605T1
2`0002H63`0<0?ooool10000000001`0003k0_Co00000000T0400000100045AYKFEc0000H@X::ZF7
kGN^Qnegd6O_Mf4:2RX000X0100002d11`0700008@D204i1N06/00L0000Q1@80CT9h0AD11`000245
0P1>D=00l00700008@D204iDi`1J00L0000H1>l0O03Y07H020000245101H@E@`E@5N00P0000Q1@@0
F45@<5D1dP0800008@D405Q2E31E0EL120000245101H@U0`IP7R00D0000D0RD1R`4500004`8U0Jh1
300002@3102;0BD1TP4X0I818P6;0BD11`0002450P1HER41V`4400009`7oo`@0003`0@D01`000?`2
003oool000040000;@4500P0003j0P000000000000040000;@4800@0000W0Ooo200002H63`060?oo
ool100@0000W0Ooo1@0000810@0000@0000]0@000`0000004@0000`0000800002`000100000g0@00
Z00000T0000@0000=`400:P0000:000040000000000000002@000100003E0@00o@000580001<0@00
0@0001000007000000000000002l0P0000000000009C07T0L`1d06D0K@0000000000000000000000
00000000000000000000000000000000000000000000000000000:3e4P2oUDX02PH100`000000000
f42O0``0000XjGd02PH100c@mgOoooooB?@B0000001Hm180000C01Wbn7L60000h0HC00004`28:AD0
<?@B0000UP5HmA80e2ciMf3HnGOooooo7?DB05A7mWOP1Q<0HPXQ78cd4P00024L`5XK00T0002ge>eg
40000000001R2R4L000Q0<3d4P3IanegHPXQ768:8A`10000gY/F0;AUkGLJmA800000000000000000
00000000000000000@410@410@410Neg9@0000`0000100004P0000`000010000DP0004`100020000
loooo`0000000000000009010000000014004U@0J@1]06D0L`0P04h0I@1g0200DP1_06d0H@1^0000
0000000000000000000000000000000000000000000000X0X?DB0;nEBP0:1P4030000000003H@9l3
300002SYO@0:1P403=3gMooooom8m180000005Sd4P0001<06O;hM`H0003P1Q<0000C08PY5@0`m180
002F0ESe4P3D;?UgH=SiMooooolLmA80E4OfMn064`1R2R4LS?@B00008AbTm1809@000<1J6`1R2R4L
//C]M``00038m1804P000<1J6`1R2R4LHPXQ7040000XW1H0000002?e4P0000000000000000000000
0000000000010@410@410@41kGLU000030000080000H000030000000000Q0000200001h0000H0000
00000000003E0@00o@000240000800005P0000`000000000600000`0000000006@0000`0003oool0
9@0000`0000500209@0000`0000800207`0001P0003G0@00e@400?d0003m00002P000100001@0000
`P0000T0000@0000H@400;h00009000040000641002n0000500000`0000=00005P0000`0000H0000
4P0000`000010000600000`0000000006@0000`0003oool08@0000P0000V0000700000<000060000
0@000000000000009@0000`0000300002P000100001@0000`P0001/0000@0000b00003H1000f0000
400000P1000f0@006`00010000090@00=P4003H0000@00002@4004D1000K0000400000T100150@00
=P000100001:0@00A@4001/0000@0000BP4004D1000f0000400004X1000f0@006`000100001:0@00
=P4003H0000@0000H`4003H1000K0000400006<1000C0@00=P000100001S0@00=@4001/0000@0000
BP4001<1000f0000400006<1000C0@006`000100001:0@004`4003H0000@0000BP4000@1000K0000
400000T100040@00=P000100001:0@00104001/0000@00002@4000@1000f0000400000T1000C0@00
6`000100003800004`4003H0000@00002@4001<1000K000040000<P0000C0@00=P00010000380000
104001/0000@0000Q`0000@1000f000040000<P000040@006`00010000270000104003H0000@0000
Q`0001<1000K0000400007<0000C0@00=P000100002700004`4001/0000@0000L`0001<1000f0000
400007<0000f0@006`000100001c0000=P4003H0000@0000Q`0003H1000K0000400008L000150@00
=P00010000270000=P4001/0000@0000Q`0004D1000f000040000<P000150@006`00010000380000
=P4003H0000@0000b00004D1000W0000600000@000000000oooo0000000U0000300000@0000[0000
60000500000M0@00R`4002`1001N0000L00000D00000000080000300001@0000800002P000080000
200000400@00000080000000000000000000000000000000oooo0:X0001E0000ZP0005D0002Z0000
E@000:X0001E00009@0000`0000500009@0000`000080020EP00030000010000F@0001H1001L0000
1@0005409`6;0BL1R`4Z0E40:P5A02L1GP0007000006000000000200000`0000D0000200000X0000
200000P0000100400000020000000000000000000000000000000?ooo`3o0000g@000?l0001g0000
o`000=d0003o0000M`0002D0000<00001P0002P0000<00001@0005H0000`00000@0005<0000F0@00
E`0000D0001A0201R`4P0H/1905A02@1D@0P0BD0000<0000100002P0000<00001P0002D0000<0000
0`0002/0000H0000S00001<100330000=P4002/0000H00003P4001<100150@00=P4005h0001`0000
1P000000000P0000<0000500000P0000:00000P0000800000@010000000P00000000000000000000
00000000003oool0ZP0005D0002Z0000E@000:X0001E0000ZP0005D0000U0000300000H0000U0000
300000P0081F0000<00003H0001M0000IP00068000050000S@0[0L<0:`730341S@0a0Hd0:`5N0000
L00000D00000000080000300001@0000800002P000080000200000400@0000008000000000000000
0000000000000000oooo0:X0001E0000ZP0005D0002Z0000E@000:X0001E00009@0000`000050000
:00000`000060000EP000300002Y0000G@000=T0001R00001@0000l1:`550B/1A@4a0@l1<@4?0B/1
GP0007000006000000000200000`0000D0000200000X0000200000P0000100400000020000000000
000000000000000000000?ooo`3o0000g@000?l0001g0000o`000=d0003o0000M`0002D0000<0000
1P0002P0000<00001@0005H0000`0000=P0004`0001V0000E@0000D0002=01P1``0H0L<08P6=0281
S@0H0Eh0001`00001@000000000P0000<0000500000P0000:00000P0000800000@010000000P0000
000000000000000000000000003oool0o`000=d0003o0000M`000?l0003M0000o`0007L0000U0000
300000D0000X0000300000H0001F0000<0000:T0001<0000f@0005D0000500003`4H0DD160550B81
3`4R0@l1604U0000300000<0000K0000400008d0000d0@00=P00010000330000=04001/0000@0000
3P4003@1000f0000400004D1000d0@006`00010000330000<P4003H0000@0000``0005h1000K0000
40000<P0000h0@00=P00010000380000GP4002H0000L00001P0000H00002000000000000000U0000
300000H0000K0000400007T0003/0000=P000100001i00004P4001/0000@0000I@000>`0000f0000
40000>D0003/00006`000100001O0@00k00003H0000@0000G`4001<1000K000040000>T000390000
=P000100003Y00004`4001/0000@0000k@000>`0000f0000400005h1003/00006`000100002X0000
AP4003H0000@0000Z00007P1000K0000400002X100160@00=P000100000Z0@00N04002D0000<0000
0`0002P0000<00001P0001/0000@0000]@0005T1000f000040000>80001I0@009`0001P000060000
00000000000000009@0000`000060000:00000`000050000EP0002`0001N0000P`0006@000280000
10000<40F@6j05`1^P1F0L40F@5F0000;00006/000230000L@0008P000040000b@1I0M00G07@05H1
b@1I0A/0000@0000A@400381000f0000400004D1001N0@006`000100001:0@00>04003H0000@0000
BP4005h1000K0000400003L1001I0@00=P000100001T0@00F@4005H0000/0000d@0008<0003G0000
R00000@000130ET1?05L0C`1EP530ET1EP0002`0003N0000P`000>@000280000100004/1F@5B0E`1
DP5F0D/1F@4K0000400000h1001N0@00=P000100000>0@00<P4001/0000@00002@4005h1000f0000
400000T1000h0@006`000100003_0000F@4003H0000@0000704005T1001F0000;0000:X000230000
/00008P000040000405I0AL1G04G0EH1405I0EH0000/0000W00008<0002S0000R00000@000080ET1
0@5L0@41EP480ET16`000100002<0000GP4003H0000@0000S0000381000K0000400008L0001N0@00
=P00010000270000>04001/0000@0000K@0005T1000f0000400009X0001I0@00EP0002`0000g0000
P`0003d000280000100008h0F@6E05`1U@1F0Hh0F@5F0000;00002X000230000<00008P000040000
QP1I0Gl0G05o05H1QP1I0E80001<0@001@000?Coool0000000000000002@0@00000000@0011D06T0
K@1U07<0000000000000000000000000000000000000000000000000000000000000000000000000
003iMooooolLm180g4gfMh064`0PCaD084lE0000001[2Q03<`L42`0010040000H?@B034Zl7L001<0
0000021?5@1Pm18000000:gbn7L001<0h<`D0000000lm1800H000;cd4P3D;?UgL=SiMooooon8m180
g4gfMk064`0001@010000000003@YAH0X?@B08^nkGL50000c?@B034Zl7L001<00000068:8A`10000
oZDF0=2U5P0ImA80000000000000000000000000000000000@410@410@410Neg9@0000`000050000
E00005P0001A0000UP000600002S00000@0009aZ3D93N@e2[00007P100020000C000000000000000
00000?ooooooooooD00004h0@@0900002@0005@0001H0000[P0009H0002l0000X`000040002LJPe2
@gT=@QD1001h0@000P0004`00000000000000000003ooooooooooe00001>04802@0000P0001D0000
F00008d000010000V`0000h000010000W6X=@T=i3D;`0000d0000080001<00000000000000000000
oooooooooom@0000CP1@00T000080000E00005P0000900005P0001P0000S00000@0009aZ3D93N@e2
FP000>L000020000C00000000000000000000?ooooooooooD00004h0E00900002@0002X0000H0000
MP000>T0001k0000kP0005@0001T0000300007L0000Y0000Q0000040002LJPe2@gT=@Uh0001E0@00
100004`00000000000000000003ooooooooooe@0001H0440E00`00T0000900002@0000L0001D0000
I00007<0001g0000S`0008@000010000W6X=@T=i3D;B0000E@4000@0001<00000000000000000000
oooooooooomD0000F0110500<00900002@0000P000070000E00006@0003Y0000M`0000D100240000
0@0009aZ3D93N@e2E`4005D100040000C00000000000000000000?ooooooooooE00005P0@P1D0300
2@0000P0000900001`0005@0001T0000P@0008H0002L0000T`000040002LJPe2@gT=@^80001V0@00
100004`00000000000000000003ooooooooooe@0001H0480D00`00T000080000200000L0000K0000
400008/1000U0@00=P000100002^0@009@4005H0000/00005P4005D0000M0@00FP0000@0002;0BD1
TP4X0I818P6;0BD1E00005P0000U0@00B@0003<1001F00000@0009aZ3D93N@e2V`40024100020000
C00000000000000000000?ooooooooooD00005P0EP09000020000280000<0000ooooobP0000<0000
100002L0000H000010000000003oool0000002D0000<0000100002H0000L00001`00000000000000
00000000000U0000300000L0000R000030000?oooolR000030000?oooolB000030000040000U0000
30000040000U0000300000L0080U000030000000080`0000300000l0080U0000300000d0081;0000
4000000000050000:00000`000010000:00000`000020000:00000`000030000:00000`000040000
:00000`000060000:00000`000050000:00000`0000700003P0001@000000000400001@0
\>"], "Graphics",
 ImageSize->{309, 162},
 ImageMargins->{{0, 0}, {0, 1}}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["System model", "Subsection",
 CellChangeTimes->{{3.504161099890625*^9, 3.504161102453125*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", "\"\<Hydraulic\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"displayName", "=", "\"\<Valve43LS\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{
  "brief", "=", "\"\<A load sensing hydraulic directional valve\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"componentType", "=", "\"\<ComponentQ\>\""}], ";"}], "\n", 
 RowBox[{
  RowBox[{"author", "=", "\"\<Petter Krus <petter.krus@liu.se>\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
  "affiliation", " ", "=", " ", 
   "\"\<Division of Fluid and Mechatronic Systems, Link\[ODoubleDot]ping \
University\>\""}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SetFilenames", "[", 
   RowBox[{"path", ",", "domain", ",", "displayName"}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ResetComponentVariables", "[", "]"}], ";"}]}], "Input",
 CellChangeTimes->{{3.503905077842648*^9, 3.503905079842648*^9}, {
   3.5039103076641607`*^9, 3.5039103985397425`*^9}, {3.5039164662834997`*^9, 
   3.5039164750178747`*^9}, {3.5039165143772497`*^9, 
   3.5039165189397497`*^9}, {3.5041051675625*^9, 3.504105226359375*^9}, {
   3.507570546125*^9, 3.507570569546875*^9}, {3.507570601046875*^9, 
   3.50757067696875*^9}, 3.507796401609375*^9, {3.507887022343302*^9, 
   3.507887057967846*^9}, {3.5078871702320337`*^9, 3.507887175028847*^9}, {
   3.5158208831437864`*^9, 3.51582092036206*^9}, {3.5158209798300486`*^9, 
   3.51582099300181*^9}, {3.522605661421875*^9, 3.522605661625*^9}, {
   3.565433404364499*^9, 3.5654334224825306`*^9}, {3.5695965311236906`*^9, 
   3.569596540324217*^9}, 3.5757721159132*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"nodeConnections", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"HydraulicQnode", "[", 
      RowBox[{"p", ",", 
       RowBox[{"1.", "*", 
        RowBox[{"10", "^", "5"}]}], ",", "\"\<Pressure port\>\""}], "]"}], 
     ",", "\[IndentingNewLine]", 
     RowBox[{"HydraulicQnode", "[", 
      RowBox[{"t", ",", 
       RowBox[{"1.", "*", 
        RowBox[{"10", "^", "5"}]}], ",", "\"\<Tank port\>\""}], "]"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"HydraulicQnode", "[", 
      RowBox[{"a", ",", 
       RowBox[{"1.", "*", 
        RowBox[{"10", "^", "5"}]}], ",", "\"\<Load port A\>\""}], "]"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"HydraulicQnode", "[", 
      RowBox[{"b", ",", 
       RowBox[{"1.", "*", 
        RowBox[{"10", "^", "5"}]}], ",", "\"\<Load port B\>\""}], "]"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"HydraulicQnode", "[", 
      RowBox[{"ls", ",", 
       RowBox[{"1.", "*", 
        RowBox[{"10", "^", "5"}]}], ",", "\"\<LS port\>\""}], "]"}]}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.503919051294972*^9, 3.503919119154347*^9}, {
   3.503923736440875*^9, 3.503923751003375*^9}, {3.5039293570625*^9, 
   3.503929406765625*^9}, 3.50394250446875*^9, {3.50399668911909*^9, 
   3.5039966973713074`*^9}, {3.507548807751546*^9, 3.5075488260955305`*^9}, {
   3.515612779640625*^9, 3.515612784234375*^9}, {3.5281892315*^9, 
   3.52818925309375*^9}, 3.5756490609509907`*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputVariables", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"{", 
     RowBox[{
     "xv", ",", "0.", ",", "double", ",", "\"\<m\>\"", ",", 
      "\"\<Spool position\>\""}], "}"}], "\[IndentingNewLine]", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.571994842405704*^9, 3.571994911670148*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"inputParameters", "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
      "rho", ",", "860.", ",", "double", ",", "\"\<kg/m3\>\"", ",", 
       "\"\<oil density\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Cq", ",", "0.67", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Flow coefficient.\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Sd", ",", ".01", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<spool diameter\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Frap", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Spool cricle fraction(P-A)\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Frat", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Spool cricle fraction(A-T)\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Frbp", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Spool cricle fraction(P-B)\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Frbt", ",", "1.", ",", "double", ",", "\"\<\>\"", ",", 
       "\"\<Spool cricle fraction(B-T)\>\""}], "}"}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "wls", ",", "0.01", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Area gradient LS-port\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xap0", ",", "0.0003", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Overlap\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xat0", ",", "0.0003", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Overlap\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xbp0", ",", "0.0003", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Overlap\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xbt0", ",", "0.0003", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Overlap\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xlsa0", ",", "0.0003", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Overlap\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xlsb0", ",", "0.0003", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Overlap\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xls0", ",", "0.0003", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Zero opening LS port\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xvmax", ",", "0.01", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Max valve opening\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "Xvlsmax", ",", "0.001", ",", "double", ",", "\"\<m\>\"", ",", 
       "\"\<Max opening LS port\>\""}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
      "plam", ",", "10000.", ",", "double", ",", "\"\<Pa\>\"", ",", 
       "\"\<Turbulence onset pressure\>\""}], "}"}]}], "\[IndentingNewLine]", 
    "}"}]}], ";"}]], "Input",
 PageWidth->WindowWidth,
 CellChangeTimes->{{3.503916073562605*^9, 3.50391608476573*^9}, {
   3.5039161716261826`*^9, 3.503916172813698*^9}, 3.503919167716847*^9, {
   3.505588895375*^9, 3.5055889695*^9}, {3.505589016640625*^9, 
   3.505589034984375*^9}, {3.505589276125*^9, 3.505589277078125*^9}, {
   3.505590362109375*^9, 3.50559036675*^9}, {3.505590803484375*^9, 
   3.50559082509375*^9}, {3.5075449148100324`*^9, 3.507544933372048*^9}, {
   3.5075449813674784`*^9, 3.507545001403344*^9}, {3.507562171421875*^9, 
   3.50756217203125*^9}, {3.5158237803828354`*^9, 3.5158238002578354`*^9}, {
   3.52819029396875*^9, 3.5281904303125*^9}, {3.569596832671938*^9, 
   3.5695968327619433`*^9}, {3.571978306807603*^9, 3.5719783134688883`*^9}, {
   3.5719864066873174`*^9, 3.571986423113763*^9}, {3.571986461692563*^9, 
   3.571986546228963*^9}, {3.571986988412763*^9, 3.571986993155163*^9}, {
   3.571987095936763*^9, 3.571987118151163*^9}, 3.579285124356419*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"qpa", " ", "=", " ", 
   RowBox[{"Kspa", " ", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      RowBox[{"pp", "-", "pa"}], ",", "plam"}], "]"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"qta", " ", "=", " ", 
   RowBox[{"Ksta", " ", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      RowBox[{"pt", "-", "pa"}], ",", "plam"}], "]"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"qpb", " ", "=", " ", 
   RowBox[{"Kspb", " ", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      RowBox[{"pp", "-", "pb"}], ",", "plam"}], "]"}]}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"qtb", " ", "=", " ", 
   RowBox[{"Kstb", " ", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      RowBox[{"pt", "-", "pb"}], ",", "plam"}], "]"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"qlsa", " ", "=", " ", 
   RowBox[{"Kslsa", " ", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      RowBox[{"pls", "-", "pa"}], ",", "plam"}], "]"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"qlsb", " ", "=", " ", 
   RowBox[{"Kslsb", " ", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      RowBox[{"pls", "-", "pb"}], ",", "plam"}], "]"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"qlst", " ", "=", " ", 
   RowBox[{"Kslst", " ", 
    RowBox[{"signedSquareL", "[", 
     RowBox[{
      RowBox[{"pls", "-", "pt"}], ",", "plam"}], "]"}]}]}], ";"}]}], "Input",
 CellChangeTimes->{
  3.504198984265625*^9, 3.505589001421875*^9, {3.5075513871678333`*^9, 
   3.5075513902618604`*^9}, {3.5158238134609604`*^9, 
   3.5158238195390854`*^9}, {3.528189406765625*^9, 3.5281894573125*^9}, {
   3.528189492765625*^9, 3.52818949975*^9}, {3.5696056737376184`*^9, 
   3.569605691443631*^9}, 3.5696059485853386`*^9}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"Xpa", " ", "=", " ", 
   RowBox[{"limit", "[", 
    RowBox[{
     RowBox[{"xv", " ", "-", " ", "Xap0"}], ",", "0.", ",", 
     RowBox[{"Xvmax", " ", "-", " ", "Xap0"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Xta", " ", "=", " ", 
   RowBox[{"limit", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "xv"}], " ", "-", " ", "Xap0"}], ",", "0.", ",", 
     RowBox[{"Xvmax", " ", "-", " ", "Xat0"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Xpb", " ", "=", " ", 
   RowBox[{"limit", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "xv"}], " ", "-", " ", "Xap0"}], ",", "0.", ",", 
     RowBox[{"Xvmax", " ", "-", " ", "Xbp0"}]}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"Xtb", " ", "=", " ", 
   RowBox[{"limit", "[", 
    RowBox[{
     RowBox[{"xv", " ", "-", " ", "Xap0"}], ",", "0.", ",", 
     RowBox[{"Xvmax", " ", "-", " ", "Xbt0"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Xlsa", " ", "=", " ", 
   RowBox[{"limit", "[", 
    RowBox[{
     RowBox[{"xv", " ", "-", " ", "Xlsa0"}], ",", "0.", ",", 
     RowBox[{"Xvlsmax", " ", "-", " ", "Xlsa0"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Xlsb", " ", "=", " ", 
   RowBox[{"limit", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "xv"}], " ", "-", " ", "Xlsb0"}], ",", "0.", ",", 
     RowBox[{"Xvlsmax", " ", "-", " ", "Xlsb0"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Xlst", " ", "=", " ", 
   RowBox[{"limit", "[", 
    RowBox[{
     RowBox[{"Xls0", "-", 
      RowBox[{"Abs", "[", "xv", "]"}]}], ",", "0.", ",", "Xls0"}], "]"}]}], 
  ";"}]}], "Input",
 CellChangeTimes->{{3.50558966315625*^9, 3.50558969203125*^9}, {
  3.5055897985*^9, 3.505589808*^9}, {3.507562582*^9, 3.507562588921875*^9}, {
  3.52818973471875*^9, 3.528189747125*^9}, {3.528190104078125*^9, 
  3.52819013678125*^9}, {3.528190218359375*^9, 3.528190242265625*^9}, {
  3.569605518216723*^9, 3.569605551874648*^9}, {3.569605598299303*^9, 
  3.569605611865079*^9}, {3.5719864342365627`*^9, 3.571986436685763*^9}, {
  3.571986566664963*^9, 3.571986594432963*^9}, {3.571987124391163*^9, 
  3.571987145872363*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"wpa", " ", "=", " ", 
   RowBox[{"pi", " ", "Sd", " ", "Frap"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"wta", " ", "=", " ", 
   RowBox[{"pi", " ", "Sd", " ", "Frat"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"wpb", " ", "=", " ", 
   RowBox[{"pi", " ", "Sd", " ", "Frbp"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"wtb", " ", "=", " ", 
   RowBox[{"pi", " ", "Sd", " ", "Frbt"}]}], 
  ";"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.5055896995*^9, 3.505589724359375*^9}, {
   3.52818961478125*^9, 3.52818962775*^9}, {3.5695962884628115`*^9, 
   3.569596322162739*^9}, 3.571985056331151*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"localExpressions", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Ks", "==", 
      RowBox[{"Cq", "*", 
       FractionBox[
        RowBox[{"N", "[", 
         SqrtBox["2"], "]"}], 
        SqrtBox["rho"]]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Kspa", "==", 
      RowBox[{"Xpa", " ", "wpa", " ", "Ks"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Ksta", "==", 
      RowBox[{"Xta", " ", "wta", " ", "Ks"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Kspb", "==", 
      RowBox[{"Xpb", " ", "wpb", " ", "Ks"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Kstb", "==", 
      RowBox[{"Xtb", " ", "wtb", " ", "Ks"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Kslsa", "==", 
      RowBox[{"Xlsa", " ", "wls", " ", "Ks"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Kslsb", "==", 
      RowBox[{"Xlsb", " ", "wls", " ", "Ks"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"Kslst", "==", 
      RowBox[{"Xlst", " ", "wls", " ", "Ks"}]}]}], "\n", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.5055892220625*^9, 3.505589231265625*^9}, 
   3.505589573890625*^9, 3.505813673194783*^9, {3.5058212753418417`*^9, 
   3.5058212802010612`*^9}, {3.5058213722606153`*^9, 3.505821373432453*^9}, {
   3.5075515846230235`*^9, 3.507551585263706*^9}, 3.507551672580868*^9, {
   3.528189655421875*^9, 3.528189725703125*^9}, {3.528189882046875*^9, 
   3.528189914390625*^9}, {3.5696056995500946`*^9, 3.569605729399802*^9}, {
   3.5719026190359697`*^9, 3.5719026838072834`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemEquationsDA", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"qp", " ", "==", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "qpa"}], "-", "qpb"}], ")"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"qt", " ", "==", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "qta"}], "-", "qtb"}], ")"}]}], ",", 
     "\[IndentingNewLine]", 
     RowBox[{"qa", " ", "==", " ", 
      RowBox[{"(", 
       RowBox[{"qpa", "+", "qta"}], ")"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"qb", " ", "==", " ", 
      RowBox[{"(", 
       RowBox[{"qpb", "+", "qtb"}], ")"}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"qls", "==", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "qlsa"}], "-", "qlsb", "-", "qlst"}], ")"}]}]}], 
    "\[IndentingNewLine]", "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.50754870493773*^9, 3.507548721672319*^9}, {
   3.528189282484375*^9, 3.528189346515625*^9}, {3.52819026384375*^9, 
   3.52819026821875*^9}, {3.56960565208738*^9, 3.569605654861539*^9}, {
   3.5719026944153023`*^9, 3.5719027013105145`*^9}, 3.571977660680024*^9}],

Cell[CellGroupData[{

Cell[BoxData["systemEquationsDA"], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"qp", "\[Equal]", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "Kspa"}], " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "pa"}], "+", "pp"}], ",", "plam"}], "]"}]}], "-", 
     RowBox[{"Kspb", " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "pb"}], "+", "pp"}], ",", "plam"}], "]"}]}]}]}], ",", 
   RowBox[{"qt", "\[Equal]", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "Ksta"}], " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "pa"}], "+", "pt"}], ",", "plam"}], "]"}]}], "-", 
     RowBox[{"Kstb", " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "pb"}], "+", "pt"}], ",", "plam"}], "]"}]}]}]}], ",", 
   RowBox[{"qa", "\[Equal]", 
    RowBox[{
     RowBox[{"Kspa", " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "pa"}], "+", "pp"}], ",", "plam"}], "]"}]}], "+", 
     RowBox[{"Ksta", " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "pa"}], "+", "pt"}], ",", "plam"}], "]"}]}]}]}], ",", 
   RowBox[{"qb", "\[Equal]", 
    RowBox[{
     RowBox[{"Kspb", " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "pb"}], "+", "pp"}], ",", "plam"}], "]"}]}], "+", 
     RowBox[{"Kstb", " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "pb"}], "+", "pt"}], ",", "plam"}], "]"}]}]}]}], ",", 
   RowBox[{"qls", "\[Equal]", 
    RowBox[{
     RowBox[{
      RowBox[{"-", "Kslsa"}], " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "pa"}], "+", "pls"}], ",", "plam"}], "]"}]}], "-", 
     RowBox[{"Kslsb", " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "pb"}], "+", "pls"}], ",", "plam"}], "]"}]}], "-", 
     RowBox[{"Kslst", " ", 
      RowBox[{"signedSquareL", "[", 
       RowBox[{
        RowBox[{"pls", "-", "pt"}], ",", "plam"}], "]"}]}]}]}]}], 
  "}"}]], "Output",
 CellChangeTimes->{{3.5792826982236524`*^9, 3.5792827160176697`*^9}, 
   3.5792827783062325`*^9, 3.579283222186621*^9, 3.5792833307998333`*^9, 
   3.5792833948274956`*^9, 3.5792859187658567`*^9, 3.5814059904452777`*^9, 
   3.5814062770196686`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemBoundaryEquations", " ", "=", " ", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"pp", " ", "==", " ", 
      RowBox[{"cp", " ", "+", " ", 
       RowBox[{"Zcpe", " ", "qp"}]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"pt", " ", "==", " ", 
      RowBox[{"ct", " ", "+", " ", 
       RowBox[{"Zcte", " ", "qt"}]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"pa", " ", "==", " ", 
      RowBox[{"ca", "+", " ", 
       RowBox[{"Zcae", " ", "qa"}]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"pb", " ", "==", " ", 
      RowBox[{"cb", " ", "+", " ", 
       RowBox[{"Zcbe", " ", "qb"}]}]}], ",", "\[IndentingNewLine]", 
     RowBox[{"pls", " ", "==", " ", 
      RowBox[{"cls", " ", "+", " ", 
       RowBox[{"Zclse", " ", "qls"}]}]}]}], "\n", "      ", "}"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.50559120440625*^9, 3.50559120803125*^9}, {
  3.505591469296875*^9, 3.505591475125*^9}, {3.5075486382337513`*^9, 
  3.5075486907344227`*^9}, {3.51582107740806*^9, 3.5158210786736856`*^9}, {
  3.515900481708085*^9, 3.5159004828643227`*^9}, {3.528190463921875*^9, 
  3.52819050078125*^9}, {3.571900600684826*^9, 3.5719006286244745`*^9}, {
  3.571902595323928*^9, 3.571902603014742*^9}, {3.579283290947554*^9, 
  3.579283299277031*^9}}],

Cell[CellGroupData[{

Cell[BoxData["systemBoundaryEquations"], "Input"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"pp", "\[Equal]", 
    RowBox[{"cp", "+", 
     RowBox[{"qp", " ", "Zcp", " ", 
      RowBox[{"onPositive", "[", "pp", "]"}]}]}]}], ",", 
   RowBox[{"pt", "\[Equal]", 
    RowBox[{"ct", "+", 
     RowBox[{"qt", " ", "Zct", " ", 
      RowBox[{"onPositive", "[", "pt", "]"}]}]}]}], ",", 
   RowBox[{"pa", "\[Equal]", 
    RowBox[{"ca", "+", 
     RowBox[{"qa", " ", "Zca", " ", 
      RowBox[{"onPositive", "[", "pa", "]"}]}]}]}], ",", 
   RowBox[{"pb", "\[Equal]", 
    RowBox[{"cb", "+", 
     RowBox[{"qb", " ", "Zcb", " ", 
      RowBox[{"onPositive", "[", "pb", "]"}]}]}]}], ",", 
   RowBox[{"pls", "\[Equal]", 
    RowBox[{"cls", "+", 
     RowBox[{"qls", " ", "Zcls", " ", 
      RowBox[{"onPositive", "[", "pls", "]"}]}]}]}]}], "}"}]], "Output",
 CellChangeTimes->{3.5792826630666413`*^9, 3.5792827160546722`*^9, 
  3.579282778345235*^9, 3.579283222227624*^9, 3.579283330842836*^9, 
  3.579283394861498*^9, 3.5792859187978587`*^9, 3.58140599049028*^9, 
  3.5814062770286694`*^9}]
}, Open  ]],

Cell[BoxData[
 RowBox[{
  RowBox[{"systemVariables", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{
    "qp", ",", "qt", ",", "qa", ",", "qb", ",", "qls", ",", "pp", ",", "pt", 
     ",", "pa", ",", "pb", ",", "pls"}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.503916309424025*^9, 3.5039163118146653`*^9}, 
   3.504160933453125*^9, 3.504161512171875*^9, {3.50416161690625*^9, 
   3.504161620484375*^9}, {3.52819027446875*^9, 3.528190282078125*^9}, {
   3.5696059276041384`*^9, 3.5696059362826347`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"VariableLimits", "=."}], ";"}]], "Input",
 CellChangeTimes->{3.50391626568937*^9}],

Cell[BoxData[
 RowBox[{
  RowBox[{"variableLowLimits", " ", "=", " ", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"pp", ",", " ", "0"}], "}"}], ",", " ", 
     RowBox[{"{", 
      RowBox[{"pt", ",", " ", "0"}], "}"}], ",", " ", 
     RowBox[{"{", 
      RowBox[{"pa", ",", " ", "0"}], "}"}], ",", " ", 
     RowBox[{"{", 
      RowBox[{"pb", ",", " ", "0"}], "}"}], ",", " ", 
     RowBox[{"{", 
      RowBox[{"pls", ",", " ", "0"}], "}"}]}], "}"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.578503687973201*^9, 3.5785037499217443`*^9}, {
   3.5785038484203777`*^9, 3.5785038577239103`*^9}, 3.578506383342367*^9, {
   3.578506485618217*^9, 3.5785064856202173`*^9}, {3.578509817259776*^9, 
   3.578509821862039*^9}}],

Cell[BoxData[
 RowBox[{"Compgen", "[", "file", "]"}]], "Input"]
}, Open  ]]
}, Open  ]]
},
WindowSize->{707, 505},
WindowMargins->{{Automatic, 91}, {38, Automatic}},
FrontEndVersion->"8.0 for Microsoft Windows (64-bit) (October 6, 2011)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[579, 22, 202, 3, 71, "Section"],
Cell[CellGroupData[{
Cell[806, 29, 68, 1, 36, "Subsection"],
Cell[877, 32, 115, 3, 29, "Text"],
Cell[CellGroupData[{
Cell[1017, 39, 7568, 96, 100, "Graphics"],
Cell[8588, 137, 12170, 152, 171, "Graphics"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[20807, 295, 100, 1, 36, "Subsection"],
Cell[20910, 298, 1637, 35, 172, "Input"],
Cell[22550, 335, 1516, 35, 152, "Input"],
Cell[24069, 372, 349, 9, 72, "Input"],
Cell[24421, 383, 4246, 95, 412, "Input"],
Cell[28670, 480, 1758, 51, 152, "Input"],
Cell[30431, 533, 2172, 57, 152, "Input"],
Cell[32606, 592, 632, 16, 112, "Input"],
Cell[33241, 610, 1549, 32, 261, "Input"],
Cell[34793, 644, 1174, 29, 152, "Input"],
Cell[CellGroupData[{
Cell[35992, 677, 43, 0, 31, "Input"],
Cell[36038, 679, 2457, 74, 126, "Output"]
}, Open  ]],
Cell[38510, 756, 1306, 27, 152, "Input"],
Cell[CellGroupData[{
Cell[39841, 787, 49, 0, 31, "Input"],
Cell[39893, 789, 1037, 26, 69, "Output"]
}, Open  ]],
Cell[40945, 818, 507, 10, 31, "Input"],
Cell[41455, 830, 117, 3, 31, "Input"],
Cell[41575, 835, 734, 18, 31, "Input"],
Cell[42312, 855, 63, 1, 31, "Input"]
}, Open  ]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)

